package course.po;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@SuppressWarnings("serial")
public class Student extends User implements Comparable<Object>, Serializable {
	private int stuId;
	private String stuNo;
	private String stuName;
	private String stuSex;
	private Date stuAge;
	private String stuMajor;
    private int stuClassNo;
	private int stuGrade;
	private Course course;
	public Student() {
		super();
	}

	public Student(int stuId,String stuNo, String stuName, String stuSex, Date stuAge, String stuMajor, int stuClassNo, int stuGrade,Course course) {
		super();
		this.stuId = stuId;
		this.stuNo = stuNo;
		this.stuName = stuName;
		this.stuSex = stuSex;
		this.stuAge = stuAge;
		this.stuMajor = stuMajor;
		this.stuClassNo = stuClassNo;
		this.stuGrade = stuGrade;
		this.course =course;
	}

	public Student(String stuNo, String stuName) {
		this.stuNo = stuNo;
		this.stuName = stuName;
	}

	public Student(int stuId, String stuNo, String stuName, String stuMajor, int stuClassNo, int stuGrade,
			Course course) {
		super();
		this.stuId = stuId;
		this.stuNo = stuNo;
		this.stuName = stuName;
		this.stuMajor = stuMajor;
		this.stuClassNo = stuClassNo;
		this.stuGrade = stuGrade;
		this.course =course;
	}

<<<<<<< HEAD
	public Student(String stuNo, String stuName, String stuSex, Date stuAge, int stuClassNo, String stuMajor) {
		super();
		this.stuNo = stuNo;
		this.stuName = stuName;
		this.stuSex = stuSex;
		this.stuAge = stuAge;
		this.stuMajor = stuMajor;
		this.stuClassNo = stuClassNo;
	}

	@Override
	public String toString() {
		return "Student [编号:" + stuId + ", 学号:" + stuNo + ", 姓名:" + stuName + ", 性别:" + stuSex + ", 年龄:" + stuAge + ", 专业:" + stuMajor
				+ ", 班级:"+ stuClassNo + ", 成绩:" + stuGrade + " 课程:" +course+"]";
	}

	public int compareTo(Object object) {
		Student bk = (Student) object;
=======
	@Override
	public String toString() {
		return "Student [编号:" + stuId + ", 学号:" + stuNo + ", 姓名:" + stuName + ", 性别:" + stuSex + ", 年龄:" + stuAge + ", 专业:" + stuMajor
				+ ", 班级:"+ stuClassNo + ", 成绩:" + stuGrade + " 课程:" +course+"]";
	}

	public int compareTo(Object object) {
		List<Student> bk = (List<Student>) object;
>>>>>>> refs/remotes/origin/master
		int difference = (int) ((this.getStuId() - ((Student) bk).getStuId()) * 10000);
		return difference;
	}
    
	public int getStuId() {
		return stuId;
	}

	public void setStuId(int stuId) {
		this.stuId = stuId;
	}

	public String getStuNo() {
		return stuNo;
	}

	public void setStuNo(String stuNo) {
		this.stuNo = stuNo;
	}

	public String getStuName() {
		return stuName;
	}

	public void setStuName(String stuName) {
		this.stuName = stuName;
	}

	public String getStuSex() {
		return stuSex;
	}

	public void setStuSex(String stuSex) {
		this.stuSex = stuSex;
	}

	public Date getStuAge() {
		return stuAge;
	}

	public void setStuAge(Date stuAge) {
		this.stuAge = stuAge;
	}

	public String getStuMajor() {
		return stuMajor;
	}

	public void setStuMajor(String stuMajor) {
		this.stuMajor = stuMajor;
	}
    
	public int getStuClassNo() {
		return stuClassNo;
	}

	public void setStuClassNo(int stuClassNo) {
		this.stuClassNo = stuClassNo;
	}

	public int getStuGrade() {
		return stuGrade;
	}

	public void setStuGrade(int stuGrade) {
		this.stuGrade = stuGrade;
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}
	

}
